<template>
	<view class="image-list">
		<k-navbar title="酒店图册"></k-navbar>
		<u-row gutter="26">
			<u-col span="6" v-for="(item, index) in imgList" :key="index">
				<view class="item" @click="previewImg(item.path)">
					<u-image width="100%" height="300rpx" :src="item.path"></u-image>
					<view class="name">{{item.name}}</view>
				</view>
			</u-col>
		</u-row>
	</view>
</template>

<script>
	import kNavbar from '@/components/navbar/index'
	export default {
		components: {
			kNavbar,
		},
		data() {
			return {
				imgList: ''
			}
		},
		onLoad(option) {
			this.imgList = JSON.parse(option.params);
		},
		methods: {
			previewImg(logourl) {
				let _this = this;
				let imgsArray = [];
				imgsArray[0] = logourl
				uni.previewImage({
					current: 0,
					urls: imgsArray
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.image-list {
		background-color: #eeecec;
	}
	.item {
		margin: 20rpx 0;
		border-radius: 15rpx;
		background-color: #FFFFFF;
		text-align: center;
		box-shadow: 0px 8px 7px 1px rgba(159, 153, 153, 0.1);
		overflow: hidden;
		
		.name {
			padding: 16rpx 0;
		}
	}
</style>
